define(['./initial', './directive/fullScreenModal', './browserDetect', ], function() {

    var app = angular.module('App.tool');
    app.factory('fullScreen', ['$window', '$rootScope', '$timeout', '$compile', 'browserDetect',
        function($window, $rootScope, $timeout, $compile, browserDetect) {

            return {
                initial: function() {
                    $rootScope.browser = browserDetect();
                    $rootScope.smallScreen = document.documentElement.clientWidth < 1025 ? true : false;
                    $rootScope.smallHeight = document.documentElement.clientHeight < 830 ? true : false;
                    if ($rootScope.smallScreen) {
                        var div = document.createElement('div');
                        div.setAttribute('data-full-Screen-Modal', '');
                        document.body.appendChild(div);
                        var element = angular.element(div);
                        $compile(element)($rootScope);
                    }
                }
            };
        }
    ]);
});
